package com.it.travel.service.impl;

import com.it.travel.dao.ProductDetailMapper;
import com.it.travel.dao.ProductMapper;
import com.it.travel.service.DetailService;
import com.it.travel.vo.DetailTicketVO;
import com.it.travel.vo.DetailVO;
import com.it.travel.vo.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DetailServiceImpl implements DetailService {

    @Resource
    private ProductDetailMapper productDetailMapper;
    @Resource

    private ProductMapper productMapper;

    @Override
    public Result<?> getDetail(Integer id) {
        DetailVO detailVO = productMapper.queryDetailById(id);
        return Result.success(detailVO, "获取数据成功");
    }

    @Override
    public Result<?> getDetailTicket(Integer id) {
        DetailTicketVO detailTicketVO = productMapper.queryDetailTicketById(id);
        return Result.success(detailTicketVO,"yes");
    }
}
